// JavaScript Document

	var xmlHttp;

	function createXMLHttpRequest(){
			
			if(window.ActiveXObject){
				
				xmlHttp = new ActiveXObject('Microsoft.XMLHTTP');
				
				}else if(window.XMLHttpRequest){
				
				xmlHttp = new XMLHttpRequest();
				
				}else{
					
					document.write('不能用了');
					
					}
		
		}
	
	function ajax(){
	alert('fdfd');
		createXMLHttpRequest();
		
		xmlHttp.onreadystatechange=callBack;
		
		var zhe=getval('aadd','v');
		
		var url='ajax.php?aa='+escape(zhe);//escape处理编码
		
		xmlHttp.open('get',url);
		
		xmlHttp.send(null);
		
	/*	var url='ajax.php';//escape处理编码
		
		xmlHttp.open('post',url);
		xmlHttp.setRequestHeader("Content-Type",'application/x-www-form-urlencoded');
		xmlHttp.setRequestHeader('Cache-control','no-cache');//让浏览器不缓存
		xmlHttp.send('aa='+zhe);*/
		}
		
	function callBack(){
		
		if(xmlHttp.readyState==4){
			
			if(xmlHttp.status==200){
				
				var val = xmlHttp.responseText;
				
				getval('aa','h',val);
			
				
				}
			
			}else{
				
				document.getElementById("aa").innerHTML="<img src='100x75.jpg'/>";
				
				}
		
		}

	function getval(values,type,a){
			
		if(type=='v'){
			
			var she = document.getElementById(values).value;
			
		}
		
		if(type=='h'){
			
			var she = document.getElementById(values).innerHTML=unescape(a);//
			
		}
		
		return she;
	}